﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Web;
using Zeus.Comunicaciones.Componentes;
using Zeus.Comunicaciones.Entidades;

namespace Zeus.Comunicaciones.Servicios.Rest
{
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class AccesoServicio
    {
        Procesos proceso = new Procesos();

        [WebInvoke(Method = "POST", UriTemplate = "Login", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        public ServiceResponseSingleEntity Autenticar(string usuario, string contrasena)
        {
            ServiceResponseSingleEntity response = proceso.Autenticacion(usuario, contrasena);
            return response;
        }
    }
}